package homework;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;

public class H02 {
    public static void main(String[] args) throws IOException {
        ArrayList<String> list = new ArrayList<>();
        list.add("迪丽热巴");
        list.add("古力娜扎");
        list.add("周杰伦");
        list.add("蔡徐坤");
        BufferedWriter bw = new BufferedWriter(new FileWriter("DAY12\\TESE.txt"));
        int i = 0;
        while (i<list.size()){
            bw.write(list.get(i));
            bw.newLine();
            bw.flush();
            i++;
        }
    }

}
